package sprachkern;

import java.util.Calendar;
import java.util.GregorianCalendar;

public class Kalender {

	public static void main(String[] args) {

		GregorianCalendar gk;
		gk = new GregorianCalendar();
		gk = new GregorianCalendar(2008, 5, 17); // = 17.16.2008
		
		gk.set(Calendar.MONTH, 11);
		
		gk.set(2011, 11, 32, 8, 30);
		gk.add(Calendar.DAY_OF_MONTH, 54);

		System.out.println(gk);

		System.out.println(gk.get(Calendar.DAY_OF_MONTH) + "."
				+ (gk.get(Calendar.MONTH) + 1) + "." + gk.get(Calendar.YEAR));
		
		System.out.printf("%tH:%tM:%tS\n", gk, gk, gk);
		System.out.printf("%1$tH:%1$tM:%1$tS\n", gk);
		
		System.out.printf("%1$td.%1$tm.%1$tY", gk);

	}

}
